package com.qzxl.conntext.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: jintianyun
 * @Date: 2020/11/13 10:48
 * @Description:
 */
public class mapUtil {
    public static Map<String, String> mapStringToMap(String str) {
        str = str.substring(1, str.length() - 1);
        String[] strs = str.split(",");
        Map<String, String> map = new HashMap<String, String>();
        for (String string : strs) {
            String key = string.split("=")[0].trim();
            String value = string.split("=")[1];
            map.put(key, value);
        }
        return map;
    }
}
